﻿using BCCommon.PaymentEnums;
using BCCommon.TMS.Order;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCEntity.TMS.Order.OrderExtention
{
    /// <summary>
    /// 订单扩展信息
    /// </summary>
    [Table("orderextention")]
    public class OrderExtentionEntity
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        /// <summary>
		/// 订单扩展信息Id
        /// </summary>
        public long OrderExtentionId { get; set; }
        /// <summary>
        /// 货车装货左侧照片地址
        /// </summary>
        public string LoadPhotoLeft { get; set; }
        /// <summary>
        /// 货车装货正面照片地址
        /// </summary>
        public string LoadPhotoFront { get; set; }

        /// <summary>
        /// 货车装货背面照片地址
        /// </summary>
        public string LoadPhotoBack { get; set; }
        /// <summary>
        /// 与货主合影
        /// </summary>
        public string LoadPhotoShipping { get; set; }
        /// <summary>
        /// 订单Id
        /// </summary>
        public long OrderId { get; set; }
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }
        /// <summary>
        /// 目的地地址
        /// </summary>
        public string EndAddress { get; set; }
        /// <summary>
        /// 目的地省名称
        /// </summary>
        public string EndProvinceName { get; set; }
        /// <summary>
        /// 目的地城市名称
        /// </summary>
        public string EndCityName { get; set; }
        /// <summary>
        /// 目的地区县名称
        /// </summary>
        public string EndCountyName { get; set; }
        /// <summary>
        /// 目的地省Code
        /// </summary>
        public string EndProvinceCode { get; set; }
        /// <summary>
        /// 目的地城市Code
        /// </summary>
        public string EndCityCode { get; set; }
        /// <summary>
        /// 目的地区县Code
        /// </summary>
        public string EndCountyCode { get; set; }
        /// <summary>
        /// 目的地经度
        /// </summary>
        public double EndLongitude { get; set; }
        /// <summary>
        /// 目的地纬度
        /// </summary>
        public double EndLatitude { get; set; }
        /// <summary>
		/// 货物SKU
        /// </summary>		
        public string GoodsSku { get; set; }
        /// <summary>
        /// 货物照片
        /// </summary>		
        public string GoodsPhoto { get; set; }
        /// <summary>
        /// 货物名称
        /// </summary>		
        public string GoodsName { get; set; }
        /// <summary>
        /// 货物重量
        /// </summary>		
        public decimal? GoodsWeight { get; set; }
        /// <summary>
        /// 货物体积
        /// </summary>		
        public decimal? GoodsVolume { get; set; }
        /// <summary>
        /// 货物长度
        /// </summary>		
        public decimal? GoodsLength { get; set; }
        /// <summary>
        /// 货物宽度
        /// </summary>		
        public decimal? GoodsWidth { get; set; }
        /// <summary>
        /// 货物高度
        /// </summary>		
        public decimal? GoodsHeight { get; set; }
        /// <summary>
        /// 货物数量
        /// </summary>		
        public int? GoodsCount { get; set; }
        /// <summary>
        /// 货物单价
        /// </summary>		
        public decimal? GoodsPrice { get; set; }
        /// <summary>
        /// 货物单位
        /// </summary>		
        public string GoodsUnit { get; set; }
        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string Consignee { get; set; }
        /// <summary>
        /// 收货人性别
        /// </summary>
        public string ConsigneeGender { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ConsigneePhone { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 出发时间
        /// </summary>
        public DateTime? StartTime { get; set; }
        /// <summary>
        /// 到达时间
        /// </summary>
        public DateTime? EndTime { get; set; }
        /// <summary>
        /// 付款时间
        /// </summary>
        public DateTime? PayTime { get; set; }
        /// <summary>
        /// 目的地顺序(升序排列)
        /// </summary>
        public int EndIndex { get; set; }
        /// <summary>
        /// 地址类型
        /// </summary>
        public string AddressType { get; set; }
        /// <summary>
        /// 超时分钟
        /// </summary>
        public int TimeOutMinute { get; set; }
        /// <summary>
        /// 问题订单
        /// </summary>
        public bool IsProblemOrder { get; set; }
        /// <summary>
        /// 已超时
        /// </summary>
        public bool IsTimeout { get; set; }

        /// <summary>
        /// 已收款
        /// </summary>
        public bool? IsCashed { get; set; }

        /// <summary>
        /// 收款方式
        /// </summary>
        public PaymentChannelType? CashMode { get; set; }

        /// <summary>
        /// 超时索赔金额
        /// </summary>
        public decimal? TimeoutClaimPay { get; set; }

        /// <summary>
        /// 超时时效分钟
        /// </summary>
        public int? AgingMinutes { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        [NotMapped]
        public string OrderStatus { get; set; }

        /// <summary>
        /// 问题订单备注
        /// </summary>
        public string ProblemOrderRemark { get; set; }

        /// <summary>
        /// 收款时间
        /// </summary>
        public DateTime? CashedTime { get; set; }
        /// <summary>
        /// 验收时间
        /// </summary>
        public DateTime? AcceptanceTime { get; set; }
        /// <summary>
        /// 验收签名
        /// </summary>
        public string AcceptanceSignature { get; set; }
        /// <summary>
        /// 验收拍照
        /// </summary>
        public string AcceptancePhoto { get; set; }
        /// <summary>
        /// 目的地省名称
        /// </summary>
        [NotMapped]
        public string ProvinceName { get; set; }
        /// <summary>
        /// 目的地城市名称
        /// </summary>
        [NotMapped]
        public string CityName { get; set; }
        /// <summary>
        /// 目的地区县名称
        /// </summary>
        [NotMapped]
        public string CountyName { get; set; }
    }
}
